﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="SubscribeTags.aspx.vb" Inherits="Assignment4.SubscribeTags" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h1>Subscribe to Tags
    </h1>

    <asp:GridView ID="grvTagSubscribe" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" BackColor="White" 
        BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
        DataKeyNames="TagId" DataSourceID="SqlDataSourceTags">
        <Columns>
            <asp:BoundField DataField="TagId" HeaderText="TagId" InsertVisible="False" 
                ReadOnly="True" SortExpression="TagId" Visible="False" />
            <asp:BoundField DataField="TagName" HeaderText="Tag Name" 
                SortExpression="TagName" />
            <asp:ButtonField CommandName="Select" Text="Subscribe" HeaderText=" " />
        </Columns>
        <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
        <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
        <RowStyle BackColor="White" ForeColor="#003399" />
        <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
        <SortedAscendingCellStyle BackColor="#EDF6F6" />
        <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
        <SortedDescendingCellStyle BackColor="#D6DFDF" />
        <SortedDescendingHeaderStyle BackColor="#002876" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSourceTags" runat="server" 
        ConnectionString="<%$ ConnectionStrings:learningConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:learningConnectionString.ProviderName %>" SelectCommand="SELECT TagId, TagName, UserId, Visible FROM Tags WHERE (Visible = true)
Order by TagName"></asp:SqlDataSource>

</br>
    <asp:Label ID="lblMessage" runat="server" Text=""></asp:Label>
</asp:Content>
